import request from "@/utils/request.js"


const baseUrl = '/app'
// 创建
export const save = (operateType, data) => {
	return request({
		url: `${baseUrl}/workflow/audit/save/${operateType}/HOLIDAY`,
		method: "POST",
		data
	})
}
// 查询详情数据
export const getDetail = (data) => {
	return request({
		url: `${baseUrl}/workflow/audit/info/HOLIDAY`,
		method: "GET",
		data
	})
}
// 列表
export const getPages = (data) => {
	return request({
		url: `${baseUrl}/workflow/audit/pages/HOLIDAY`,
		method: "post",
		data
	})
}
// 代办列表
export const getTaskPages = (data) => {
	return request({
		url: `${baseUrl}/workflow/task_info/pages/HOLIDAY`,
		method: "POST",
		data
	})
}
// 撤回
export const reback = (data) => {
	return request({
		url: `${baseUrl}/workflow/audit/reback`,
		method: "POST",
		data
	})
}
// 详情
export const detail = (data) => {
	return request({
		url: `${baseUrl}/workflow/audit/info/HOLIDAY`,
		method: "GET",
		data
	})
}
// 基本信息的提交保存
export const baseSave = ({
	operateType,
	...data
}) => {
	return request({
		url: `${baseUrl}/workflow/task_info/save/${operateType}/HOLIDAY`,
		method: "POST",
		data
	})
}
// 代办详情查询
export const taskDetail = (data) => {
	return request({
		url: `${baseUrl}/workflow/task_info/info/HOLIDAY`,
		method: "GET",
		data
	})
}
// 查询流程记录表
export const auditItem = (businessId, data) => {
	return request({
		url: `${baseUrl}/workflow/audit_item/list/HOLIDAY/${businessId}`,
		method: "post",
		data
	})
}
// 附件
export const businessAttach = (businessId, data) => {
	return request({
		url: `${baseUrl}/workflow/business_attach/list/HOLIDAY/${businessId}`,
		method: "post",
		data
	})
}